package com.gzbsoft.sc.modules.app.controller;
import com.gzbsoft.sc.common.annotation.LoginUser;
import com.gzbsoft.sc.common.utils.R;
import com.gzbsoft.sc.modules.app.service.JxCompanyService;
import com.gzbsoft.sc.modules.sys.controller.AbstractController;
import com.gzbsoft.sc.modules.sys.entity.JxCompany;
import com.gzbsoft.sc.modules.sys.entity.JxUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@Api("公司信息")
@RestController
@RequestMapping("/app/company")
public class AppCompanyController extends AbstractController {
    private final JxCompanyService jxCompanyService;
    public AppCompanyController(JxCompanyService jxCompanyService) {
        this.jxCompanyService = jxCompanyService;
    }
    @ApiOperation(value = "完善公司信息")
    @PostMapping("/")
    public R save(@RequestBody JxCompany jxCompany, @ApiIgnore @LoginUser JxUser user) {
        jxCompany.setUser(user);
        jxCompanyService.save(jxCompany);
        return R.ok();
    }
}
